
public class PostorderTree<T extends Comparable<? super T>> extends SortedTree<T> {
	//blaTree<T extends Compareable<? super T>>

	public PostorderTree(T label) {
		super(label);
	}
	
	
	@Override
	protected Tree<T>.TreeList getTreeAsList(Tree<T> node) {
		TreeList tl = new TreeList();
		
		if(node.getLeft() != null)
			tl.add(getTreeAsList(node.getLeft()));
		
		if(node.getRight() != null)
			tl.add(getTreeAsList(node.getRight()));
		
		tl.add(node);
		
		return tl;
	}

	@Override
	protected Tree<T> getEmptyTree(T node) {
		InorderTree<T> elem = new InorderTree<T>(null);
		elem.setLabel(node);
		return elem;
	}


}
